#!/bin/bash
echo "Now path:"
pwd
echo "Compile .java"
if [ $1 = '1.6' ] ;then
echo "1.6"
elif [ $1 = '1.7' ] ;then
echo "1.7"
fi
/opt/seamtop/server/jdk1.7.0_71/bin/javac IndexOperator.java

cd /opt/seamtop/cuberclient/jar
echo "Now path:"
pwd
echo "unzip jar file:"
/opt/seamtop/server/jdk1.7.0_71/bin/jar xf cuber-client.jar
cd /opt/seamtop/cuberclient/
echo "move class file:"
mv IndexOperator.class /opt/seamtop/cuberclient/jar/com/seamtop/cuber/common/entriy
cd /opt/seamtop/cuberclient/jar
rm -rf cuber-client.jar
echo "zip file:"
/opt/seamtop/server/jdk1.7.0_71/bin/jar cvf cuber-client-bak.jar *
rm -rf com
rm -rf *.xml
rm -rf M*
echo "End"
